package com.hllxd.hism.passport.login.gateway.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lixiyong01
 * @date 2022.01.13 修改cookie有效期
 * 常量定义
 */
public class Constants {

    /** cookie 有效时间 */
    public static int COOKIE_VALID_DAY = 15;

    // 业务子项异常
    public static int VHLL_ERR_CODE = 1;
    public static int INDEX_ERR_CODE = 2;
    public static int ITEM_ERR_CODE = 3;
    public static int ATTR_ERR_CODE = 4;

    public static final int DEFAULT_DAYS = 10; // 查询范围默认是10d

    public static final int DEVELOP_STATUS_CODE = 0;// 开发中
    public static final int ONLINE_STATUS_CODE = 1; //在线
    public static final int OFFLINE_STATUS_CODE = 2;/// 已下线



    public static final String PV_PAN_DIAN = "listPandianResult";
    public static final String PV_INDUSTRY_WHOLE = "industryReportWhole";
    public static final String PV_INDUSTRY_GROUP = "industryReportGroup";
    public static final String PV_INDUSTRY_SHOP = "industryReportShop";
    /**
     * 固定线程池MAX最大线程数
     */
    public static final int FIXED_THREAD_POOL_MAX_SIZE = 5;

    public static final String CHECK_STATUS_ING = "RUNNING";//检测中
    public static final String CHECK_STATUS_FAILED = "FAILURE";//检测失败
    public static final String CHECK_STATUS_SUCCESS = "SUCCESS";//检测成功




    // 检测项定义
    public static final String CHECK_ITEM_100 = "100";// "营业相关"
    public static final String CHECK_ITEM_101 = "101";//"营业相关:目标达成率";
    public static final String CHECK_ITEM_102 = "102";//"营业相关:营业额环比";
    public static final String CHECK_ITEM_103 = "103";//"营业相关:单量环比";

    public static final String CHECK_ITEM_200 = "200";//"菜品相关";
    public static final String CHECK_ITEM_201 = "201";//"菜品相关:点单率";
    public static final String CHECK_ITEM_202 = "202";//"菜品相关:流水占比";

    public static final String CHECK_ITEM_300 = "300";//"健康分析";
    public static final String CHECK_ITEM_301 = "301";//"健康分析:稽核预警";
    public static final String CHECK_ITEM_302 = "302";//"健康分析:差异对账";

    public static final String CHECK_ITEM_400 = "400";//"行业分析_营业";
    public static final String CHECK_ITEM_401 = "401";//"行业分析_营业:单均消费";
    public static final String CHECK_ITEM_402 = "402";//"行业分析_营业:人均消费";
    public static final String CHECK_ITEM_403 = "403";//"行业分析_营业:外卖流水占比";
    public static final String CHECK_ITEM_404 = "404";//"行业分析_营业:移动支付占比";
    public static final String CHECK_ITEM_405 = "405";//"行业分析_营业:会员消费占比";
    public static final String CHECK_ITEM_406 = "406";//"行业分析_营业:自助点餐率";

    public static final String CHECK_ITEM_500 = "500";//"行业分析_营业";
    public static final String CHECK_ITEM_501 = "501";//"行业分析_营业:毛利率";
    public static final String CHECK_ITEM_502 = "502";//"行业分析_营业:仓库周转率";

    public static final Map<String,String> descMap = new HashMap<>();
    public static final Map<String,String> descShopSaleMap = new HashMap<>();
    static{
        descMap.put("100","营业相关");
        descMap.put("101","目标达成率");
        descMap.put("102","营业额环比");
        descMap.put("103","单量环比");

        descMap.put("200","菜品相关");
        descMap.put("201","点单率");
        descMap.put("202","流水占比");

        descMap.put("300","健康分析");
        descMap.put("301","稽核预警");
        descMap.put("302","差异对账");

        descMap.put("400","行业分析_营业");
        descMap.put("401","单均消费");
        descMap.put("402","人均消费");
        descMap.put("403","外卖流水占比");
        descMap.put("404","移动支付占比");
        descMap.put("405","会员消费占比");
        descMap.put("406","自助点餐率");

        descMap.put("500","行业分析_营业");
        descMap.put("501","毛利率");
        descMap.put("502","仓库周转率");

    }
    static{
        descShopSaleMap.put("401","单均消费");
        descShopSaleMap.put("402","人均消费");
        descShopSaleMap.put("403","外卖流水占比");
        descShopSaleMap.put("404","移动支付占比");
        descShopSaleMap.put("405","会员消费占比");
        descShopSaleMap.put("406","自助点餐率");
    }

    public static final Map<String,Integer> scoreWeightMap = new HashMap<>();
    static{
        scoreWeightMap.put("100",0);
        scoreWeightMap.put("101",5);
        scoreWeightMap.put("102",5);
        scoreWeightMap.put("103",5);

        scoreWeightMap.put("200",0);
        scoreWeightMap.put("201",5);
        scoreWeightMap.put("202",5);

        scoreWeightMap.put("300",0);
        scoreWeightMap.put("301",5);
        scoreWeightMap.put("302",5);

        scoreWeightMap.put("400",0);
        scoreWeightMap.put("401",5);
        scoreWeightMap.put("402",5);
        scoreWeightMap.put("403",5);
        scoreWeightMap.put("404",5);
        scoreWeightMap.put("405",5);
        scoreWeightMap.put("406",5);

        scoreWeightMap.put("500",0);
        scoreWeightMap.put("501",5);
        scoreWeightMap.put("502",5);

    }
}
